﻿using Domain.MainModule.Orders;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using Domain.MainModule.Entities;
using System.Linq.Expressions;
using System.Collections.Specialized;
using System.Collections.Generic;

namespace Domain.MainModule.Tests
{
    [TestClass()]
    public class OrderTest
    {

        private NameValueCollection values;

        public OrderTest()
        {
            values = new NameValueCollection();
            values.Add("ExtraInfo", "algo");
            //values.Add("OrderDate", "2010-03-03");
        }

        #region Additional test attributes
        // 
        //You can use the following additional attributes as you write your tests:
        //
        //Use ClassInitialize to run code before running the first test in the class
        //[ClassInitialize()]
        //public static void MyClassInitialize(TestContext testContext)
        //{
        //}
        //
        //Use ClassCleanup to run code after all tests in a class have run
        //[ClassCleanup()]
        //public static void MyClassCleanup()
        //{
        //}
        //
        //Use TestInitialize to run code before running each test
        //[TestInitialize()]
        //public void MyTestInitialize()
        //{
        //}
        //
        //Use TestCleanup to run code after each test has run
        //[TestCleanup()]
        //public void MyTestCleanup()
        //{
        //}
        //
        #endregion


        /// <summary>
        ///A test for SatisfiedBy
        ///</summary>
        [TestMethod()]
        public void ChargeEntityTest()
        {
            Guid orderId = Guid.NewGuid();

            Order target = new Order();
            target.ChargeEntity(this.values);
            Assert.IsTrue(target.ExtraInfo == "algo");
            Assert.IsNotNull(target.OrderDate);
        }
    }
}
